package cc.ilzy.mall.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serial;
import java.io.Serializable;

@Data
@Accessors(chain = true)
@ApiModel(value = "用户注册对象", description = "用户注册请求对象")
public class UserRegisterRequest implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "昵称", example = "Anna小姐姐")
    @NotBlank
    private String name; // 昵称

    @ApiModelProperty(value = "密码", example = "12345")
    @NotBlank
    private String pwd;

    @ApiModelProperty(value = "头像", example = "https://example.com/user/avatar.jpg")
    @NotBlank
    private String headImg;

    @ApiModelProperty(value = "用户个人性签名", example = "人生需要动态规划，学习需要贪心算法")
    private String slogan;

    @ApiModelProperty(value = "0表示女，1表示男", example = "1")
    @NotNull
    private Integer sex;

    @ApiModelProperty(value = "邮箱", example = "1118844@qq.com")
    @Email
    private String mail;

    @ApiModelProperty(value = "验证码", example = "232343")
    @NotBlank
    private String code;

}
